Q & A Project 2

  • Q: I believe you mentioned in class today that we should not focus on the orientation aspect of the Project 2. Is this correct?
    A: I recommended to not focus on rotational velocity and position INITIALLY so that you get to see something on the screen immediately

  • Q: A difficulty has occurred [when computing the impulse] that we have to do a multiplication of a 3X1 vector and another 3X3 matrix, which isn't possible.
    A: In the expression
    x   is a cross-product     r = rotation axis     n = normal
    Consequently     r x n   is a 3-vector     (r x n)^T   is a row vector
    I^{-1}   is a 3x3 matrix     (r x n)^T I^{-1}   is a 3x1 vector     (r x n)^T I^{-1} (r x n)   is a scalar (as it should be in the denominator)

  • Q: Probably the biggest issue is the matrix multiplication and the ways in which we must manipulate the matrix classes.
    A: As discussed in class (see Colette's nice photo!) a point (x,y,z) is conveniently rotated about an axis A by an angle alpha via multiplication with the quaternion q := [cos(alpha), sin(alpha) A]:
    q^{-1} [0, (x,y,z)] q

  • Q: Line 22 of scene.h: "//Impulse is defined as a pair "
    If Impulse is change in momentum, how is it being represented by just a position and direction?
    A: Yes, that could confuse if one takes it literally. The comment intends to say that Impulse has three positional degrees of freedom and three rotational ones.

  • Q: When we update angular velocity of an object, we must integrate from acceleration (gravity). If gravity is applied on the angular velocity, does anything even happen?
    A: when you hit another object something can happen to the angular velocity even when there is only gravity (think of a rubber brick hitting the ground with one corner)

  • Q: re Impulse_new = R^T Impulse_old R     We are mostly confused because in the project every vector is stored in the format of a row vector (RowVector3d), including R here in this case. we assume that this formula requires the original R to be a column vector. A: when you use R = quaternion transformation the orientation of your vector does not matter (it is a 4-vector to start with) -- in any case you know the output is a 3x3 matrix. The code already has the formulation of applying R to a vector (see also 3 questions up in this QA and Colette's photo)

  • Q: In the handleCollision function, we are to assign impulses to ro1 and ro2. These impulses are supposed to magnitudes (j), correct? Will the values that we push into ro1.impulses and ro2.impulses be equal but opposite?
    A: Impulses have 3 positional coordinates and 3 angular coordinates (just like velocity). The magnitude "j" plays an important role in the collision resolution -- and yes, the same "j" multiplies the contactNormal with opposite signs for the two objects.